var vx=160, vy=120;
var supertime = GetTime();
var whiteass = CreateColor(255,255,255,255);

var hugeX = new Array();
var hugeY = new Array();
var hugeZ = 0;

var shit = null;
var junk = GetSystemFont();
var file = OpenFile("coords.dat");
SetUpdateScript("rock0();");
SetRenderScript("shit1();");
MapEngine('Mcmoogles.rmp', 45);

function rock0()
{
	SetCameraX(GetLayerWidth(1)*16); SetCameraY(GetLayerHeight(1)/2);
	SetDelayScript(250, "modeSWITCH1();");
	SetUpdateScript("rock1();");
	SetMousePosition(vx,vy);
}

function rock1()
{
	vx = GetMouseX();
	vy = GetMouseY();
	hugeX[hugeZ] = vx;
	hugeY[hugeZ] = vy;
	hugeZ++;
}

function rock2()
{
	if (hugeX[hugeZ] == undefined) modeSWITCH2();
}

function shit1()
{
	Point(vx, vy, whiteass);
}

function shit2()
{
	shit.blit(hugeX[hugeZ] - shit.width/2,  hugeY[hugeZ] - shit.height/2);
	hugeZ++;
}

function modeSWITCH1()
{
	SetUpdateScript('rock2();'); 
	SetRenderScript('shit2();'); 
	hugeZ=0;
	var br3 = GetFileList("images");
	shit = LoadImage(br3[Math.floor(br3.length*Math.random())]);
}

function modeSWITCH2()
{
	SetUpdateScript("rock1()");
	SetRenderScript("shit1();");
	hugeZ = 0;
	SetDelayScript(250, "modeSWITCH1();");
}

function blank_init()
{
}









function npcrap(eman)
{
	this.name = eman;
	this.step = 0;
	this.mark = 0;
	this.face = true;
	this.toobusy = false;
	this.shop = false;
	this.diamark = 1;
	this.incremental = false;
	this.talkrand = false;
	this.firstonce = false;
	this.notperson = false;
	this.dirs = new Array('w');
}

function retard(eman,rss,sheeit)
{
	this.name = eman;
	this.step = 0;
	this.mark = 0;
	this.rss = rss;
	this.dirs = new Array('w');
	CreatePerson(eman, rss, sheeit);
}

function Albrook_init()
{
}

function walkgay(guy, dir)
{
	
	switch (dir)
	{		
		case ("l"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_WEST, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;				
			}
			else guy.mark++;
			break;
		}
	
		case ("r"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_EAST, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		case ("u"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_NORTH, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		case ("d"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_SOUTH, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		case ("w"):
		{
			QueuePersonCommand(guy.name, COMMAND_WAIT, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		case ("fu"):
		{
			QueuePersonCommand(guy.name, COMMAND_FACE_NORTH, false);
			guy.step++;
			break;
		}
		case ("fl"):
		{
			QueuePersonCommand(guy.name, COMMAND_FACE_WEST, false);
			guy.step++;
			break;
		}
		case ("fr"):
		{
			QueuePersonCommand(guy.name, COMMAND_FACE_EAST, false);
			guy.step++;
			break;
		}
		case ("fd"):
		{
			QueuePersonCommand(guy.name, COMMAND_FACE_SOUTH, false);
			guy.step++;
			break;
		}
		case ("ul"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_NORTH, false);
			QueuePersonCommand(guy.name, COMMAND_MOVE_WEST, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		case ("ur"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_NORTH, false);
			QueuePersonCommand(guy.name, COMMAND_MOVE_EAST, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		case ("dl"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_SOUTH, false);
			QueuePersonCommand(guy.name, COMMAND_MOVE_WEST, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		case ("dr"):
		{
			QueuePersonCommand(guy.name, COMMAND_MOVE_SOUTH, false);
			QueuePersonCommand(guy.name, COMMAND_MOVE_EAST, false);
			if (guy.mark >= 16)
			{
				guy.step++;
				guy.mark = 0;
			}
			else guy.mark++;
			break;
		}
		default:
		{
			QueuePersonScript(guy.name, dir, false);
			guy.step++;
			guy.mark = 0;
			break;
		}
		}	//end switch
}

function Toystore_init()
{
}

function mcmenu(){}
function bgmswitch(){}
function Tzen_init(){}
function JonesRd_init(){}
function Mcmoogles_init(){}
